package com.module.sysconfig.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.module.sysconfig.dao.FjpzbMapper;
import com.module.sysconfig.service.FjpzbService;
import com.support.cache.annotation.CacheEvict;
import com.support.cache.annotation.Cacheable;
import com.support.cache.annotation.KeyMode;
import com.support.jdbc.Page;

@Service
public class FjpzbServiceImpl implements FjpzbService{
	
	@Autowired
	private FjpzbMapper fjpzbMapper;
	
	/**
	 * 添加附件配置
	 */
	@CacheEvict(key="ALL_FJPZB")
	public void saveFjpzb(Map<String, String> paramsMap) 
	{
		fjpzbMapper.saveFjpzb(paramsMap);
	}

	/**
	 * 附件配置的删除
	 */
	@CacheEvict(key="ALL_FJPZB")
	public void delFjpzb(Long ID) 
	{
		fjpzbMapper.delFjpzb(ID);
	}

	/**
	 * 附件配置的修改
	 */
	@CacheEvict(key="ALL_FJPZB")
	public void updateFjpzb(Map<String, String> paramsMap) 
	{
		fjpzbMapper.updateFjpzb(paramsMap);
	}

	/**
	 * 附件配置列表查询
	 */
	@Cacheable(expire=10,keyMode=KeyMode.KEY_ONLY,key="ALL_FJPZB")
	public List<Map<String, String>> queryRecordFjpzb(Page<?> page) 
	{
		return fjpzbMapper.queryRecordFjpzb(page);
	}

	/**
	 * ID查询附件配置
	 */
	public Map<String, String> queryFjpzb(Long ID) 
	{
		return fjpzbMapper.queryFjpzb(ID);
	}

	
}
